package com.suny.thread_specifics_storage;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class TSLog {
    private PrintWriter printWriter = null;

    public TSLog(String fileName) {
        try {
            this.printWriter = new PrintWriter(new FileWriter(fileName));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void println(String s) {
        printWriter.println(s);
    }

    public void close() {
        System.out.println("======== End of Log =========");
        printWriter.close();
    }
}
